Skip to main content

Supplier Allocation For an Enquiry

Introduction

All Enquiries created on ViSN Platform will undergo a procedure that will assess the supplier's eligibility to service the vehicle that the enquiry is created for.

The allocation is driven based on following inputs and configurables

EntityApplicability
Service UnitEnquiries that allow users to select a specific supplier, will be allocated to the designated service unit.

Walk-In, Book-In (Without N/w policy), Manual Vor, Web-Link are the enquiries that allow specific selection using the Create-Enquiry wizard.
Network PolicyThe Lease Companies are configured with network policy which is depending on the Vehicle's Age and the Eligibility for warranty period



Additionally the network policy can also be created for a specific manufacturer by adding an exception.



Although its a manufacturer specific network policy it is referred as exception because the default policy will be considered for all other manufacturers except specific one
Supplier ProximityAn admin configurable value for a lease company allowing to specify the radius of the supplier identification for a given post code

Supplier Count ThresholdAn admin configurable value that enables to optimize supplier allocation by limiting the number of suppliers assigned to an enquiry.

When multiple suppliers are identified within a defined geographic radius, the system prioritizes and allocates the enquiry to the top 'n' number of nearest suppliers, thereby enhancing service delivery and operational efficiency.

Allocation TypeAutomatic : The system lets lease companies send requests to many suppliers and get quotes back to further accept one among them to work on the vehicle

---------------------------------------------------------------------------------------------

Manual : The system doesn't offer multiple manual supplier selections currently

Postcodepostcode that the vehicle is nearby

Service typeService that the vehicle is expected to undergo from the specific enquiry, can be one among shown below



Supplier typeType of the supplier that the enquiry is preferred to be allocated to, can be one among shown below



FranchisesName of the manufacturer that vehicle belongs to

Automatic Supplier Selection

Automatic allocation involves following steps

  1. Getting Geo Location Based on PostCode
  2. Getting Service units in the location's proximity
  3. Getting Service units offering opted services
  4. Filter by network policy
  5. Apply Supplier Count Threshold

Get Geo Location Based on PostCode

we retrieve the precise latitude and longitude coordinates corresponding to the provided postcode as below.

  1. We initially verify if the postcode exists within our internal database to use it.
  2. In cases where the postcode is not present in our database, we execute an API call to postcode.io to obtain the geo location.
  3. If the "postcode.io" API fails to locate the specified postcode, we leverage the Google Maps API to acquire the geo location.
  4. If we fail to get the data through Google Maps, we resort to approximating the geo location by making minor adjustments to the provided postcode.
  5. We would finally return selective geo location information as below
    • longitude : longitude from geo location
    • latitude : latitude from geo location
    • postcode : Usually its the post code that is used for location fetch, It will be the post code that location belongs to in case if both postcode.io and google-maps failed to locate it and approximate location is used
    • source : location from which location data fetched, typically google-maps (or) postcode.io

Get Service Units in post code proximity radius

We retrieve the units within the proximity as below

  1. Build a typesense geo-point filter using latitude and longitude
  2. Fetch service units based on geo-point filter
  3. Sort the results based on how distant the supplier garage is from given post code
  4. Iterate through the sorted results and add calculated distance of the unit from given post code
  5. Filter the results to include only the units whose distance from post code falls within the proximity

Get Service units offering services

We apply the service type filter for the opted services as below

  1. Get the suppliers from the previous step
  2. Build filter with the service type chosen while creating enquiry
  3. Iterate through suppliers received and add the service types offered to them
  4. Iterate through suppliers and filter them by checking if the enquiry's service type is one among the services offered by the unit.

Filter Units by Network Policy

We retrieve the network policy as below

  1. Get the default network policy configured for the lease company
  2. Get the vehicle's manufacturer from the vehicle searched for or the new vehicle being added
  3. Check if there's a manufacturer specific policy available
  4. Override default policy with manufacturer policy if available
  5. Based on the vehicle's type and warranty period eligibility get the filters for the suppliers allocation
  6. Iterate through the suppliers and enqueue the unit for allocation only when unit falls in the chosen filters for the policy.

Apply supplier count threshold

We apply the supplier count threshold as below

  1. Get the number of suppliers per enquiry from the lease company details
  2. Get the results from previous step after applying all the filters
  3. If number of suppliers per enquiry is found to be configured for the lease company, pick top n suppliers
  4. If not found to be configured then use all the suppliers for allocation

Manual Supplier Selection

Manual enquiry creation is done in following scenarios

  1. A supplier can create an enquiry for a vehicle directly brought to the garage.
  2. A Head office user, affiliated with a specific supplier group, can initiate service requests on behalf of any supplier within that group. (This feature is particularly useful when multiple suppliers within a group are capable of servicing a specific vehicle, enabling flexible assignment and efficient resource allocation.)
  3. A lease company can create enquiry through web-link or book-in enquiries by selecting eligible supplier from an approved list
  4. A lease company can initiate a manual Vehicle Off-Road (VOR) enquiry and select any supplier listed on the platform, regardless of their geographic proximity to the vehicle's location
Manual Supplier Selection involves following steps

  1. Getting Geo Location Based on PostCode
  2. Getting Service units in the location's proximity
  3. Getting Service units offering opted services
  4. Getting Service units that offer the services that are approved by lease
  5. Filtering the units by Selected Franchises if chosen

Overview

  1. Upon receiving the user's input of postcode, service type, supplier type and franchises, an API call is made to the getSuppliersFromPostcodeProximity endpoint.
  2. The first step entails identifying all suppliers located in the proximity of the given postcode within the Algolia.
  3. In order to accomplish this, we retrieve the precise latitude and longitude coordinates corresponding to the provided postcode.
  4. To optimize the process, we initially verify if the postcode exists within our internal database. If found, we directly retrieve the associated latitude and longitude from the database.
  5. In cases where the postcode is not present in our database, we execute an API call to postcode.io to obtain the necessary latitude and longitude data.
  6. If the "postcode.io" API fails to locate the specified location, we leverage the Google Maps API to acquire the latitude and longitude information.
  7. If we fail to get the data through Google Maps, we resort to approximating the latitude and longitude by making minor adjustments to the provided postcode.
  8. With the latitude and longitude successfully obtained, a call is made to Algolia, retrieving all suppliers within the vicinity of the specified postcode.
  9. Within the Algolia call, we effectively apply the supplier type filter while also ensuring that the supplier is capable of providing services within the given distance.
  10. Subsequently, we proceed to filter out any service units that have not been approved by the lease company.
  11. Further, we eliminate any service units that do not offer the specific service types requested by the customer.
  12. Next step is to append franchise details to the service units.
  13. Final filter is to eliminate any service units that do not offer the specific franchises requested by the customer.
  14. Finally, the resulting list of service units meeting all the specified criteria is promptly returned to the client.

Relation between user input and filtering of suppliers

  1. If the customer selects supplier type as Franchise, then only the Franchise suppliers will be returned.
  2. If the customer selects supplier type as Independent, then only the Independent suppliers will be returned.
  3. If the customer selects supplier type as Mobile, then any Independent or Franchise type garage who also offer Mobile services will be returned.
  4. If the customer chooses 2 service types then only the suppliers who have both the service types will be returned. (This applies only in the case of weblink enquiries, since book-in enquiry only allows one service type at a time).

Get the Geo Location Based on PostCode

we retrieve the precise latitude and longitude coordinates corresponding to the provided postcode as below.

  1. We initially verify if the postcode exists within our internal database to use it.
  2. In cases where the postcode is not present in our database, we execute an API call to postcode.io to obtain the geo location.
  3. If the "postcode.io" API fails to locate the specified postcode, we leverage the Google Maps API to acquire the geo location.
  4. If we fail to get the data through Google Maps, we resort to approximating the geo location by making minor adjustments to the provided postcode.
  5. We would finally return selective geo location information as below
    • longitude : longitude from geo location
    • latitude : latitude from geo location
    • postcode : Usually its the post code that is used for location fetch, It will be the post code that location belongs to in case if both postcode.io and google-maps failed to locate it and approximate location is used
    • source : location from which location data fetched, typically google-maps (or) postcode.io

Get the Service Units in post code proximity radius

We retrieve the units within the proximity as below

  1. Build a typesense geo-point filter using latitude and longitude
  2. Fetch service units based on geo-point filter
  3. Sort the results based on how distant the supplier garage is from given post code
  4. Iterate through the sorted results and add calculated distance of the unit from given post code
  5. Filter the results to include only the units whose distance from post code falls within the proximity

Get the Service units offering services

We apply the service type filter for the opted services as below

  1. Get the suppliers from the previous step
  2. Build filter with the service type chosen while creating enquiry
  3. Iterate through suppliers received and add the service types offered to them
  4. Iterate through suppliers and filter them by checking if the enquiry's service type is one among the services offered by the unit.

Get the units approved by lease company

We filter the units approved by lease company as below
  1. Get the list of units from the previous step
  2. Iterate through the units and look for existence of the unit in lease company level (Will Exist when network import is performed against a lease company)
  3. If exists add enabled services to servicesApproved on the corresponding unit
  4. Filter and return only the units that has approved services and chosen service is one among the approved services
Note : This step is not applicable is rate card type is VISN_WITH_DI_NETWORK or VISN_NETWORK_OFFERING_SAVI and in that case this filter will just act as 'Get Units offering services' i.e, approved services will be offered services

Get the Service units that are offering franchises

We filter the units offered by franchises as below
  1. Get the list of units from the previous step
  2. Iterate through the units and add franchises to the unit
  3. If franchises not exist treat as 'All'
  4. Filter and return only the units that has franchise of enquiry vehicle Or the units offering All franchises
Note: This filter is applied only when a franchise is chosen to be filtered on the enquiry creation screen or skipped

Get the Mobile Suppliers within the mobile radius

We apply the mobile network coverage as below:
  1. Get units from previous step
  2. Iterate through the units and do
    1. Get distance of unit from the post code's geo location
    2. Get the mobile serving radius of the service unit
    3. Check if the post code's geo location falls within the mobile coverage area of respective unit
    4. if postcode's within the mobile coverage area enqueue the enquiry for allocation
  3. Return the queue of units if mobile filter is active or the units returned from previous step if mobile filter is inactive
Below is the diagram for the same:

  1. Distance = 80 miles, mobile radius = 100 miles
    Since 100 > 80, the mobile network can be considered.
  2. Distance = 100 miles, mobile radius = 100 miles
    Since 100 = 100, the mobile network can be considered.
  3. Distance = 110 miles, mobile radius = 100 miles
    Since 100 is not greater than or equal to 110, the mobile network cannot be considered.

External APIs used

  1. https://api.postcodes.io/postcodes/${postcode}
Status: Accepted
Category: Protected
Authored By: Shubham H on Aug 10, 2023
Revisions
10 Aug, 2023 - Add documentation for get suppliers in post code proximity
06 Dec, 2024 - Update the documentation to include terms used, by Rama
17 Dec, 2024 - Update the documentation to use separate files for individual sections, by Rama
18 Dec, 2024 - Update the documentation to classify allocation as automatic and manual, by Rama
18 Dec, 2024 - Add approved by lease filter and franchise filter selections, by Rama
19 Dec, 2024 - Add Mobile Coverage Area section - VN-12816, by Rama